package com.softWang.file.util;

import com.softWang.common.exception.LogicException;
import com.softWang.file.po.FileManage;
import com.softWang.file.vo.fileManage.FileSaveResult;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;


public interface IFileSaveUtil {

    /*保存上传文件*/
    FileSaveResult saveFile(MultipartFile file, String subDir,String fileName) throws Exception;

    /*获取文件下载url*/
    String getFileUrl(FileManage baseFile) throws Exception;

    void deleteFile(FileManage baseFile) throws Exception;

    default void downFile(FileManage baseFile, HttpServletResponse response) throws Exception{ throw new LogicException("暂不支持该下载方式");}
}
